#ifndef ITEMSELECTPAGE_H
#define ITEMSELECTPAGE_H
#include "group.h"
#include <QWidget>
#include "tableView/tableviewheader.h"
#include <QStandardItemModel>
namespace Ui {
class ItemSelectPage;
}

class ItemSelectPage : public QWidget
{
    Q_OBJECT
    enum COLUMN_NUM_E
    {
        COLUMN_CHECKBOX = 0,
        COLUMN_NO,
        COLUMN_MUSCINAME,
        COLUMN_MUSCISINGER,
        COLUMN_MUSCIBELONG,
        COLUMN_MUSCITIME

    };
public:
    explicit ItemSelectPage(QWidget *parent = nullptr);
    ~ItemSelectPage();
    void initMusicInfo();
    void paintEvent(QPaintEvent *event);
    void initTableView();
    void setColumnWidth();
    void RefreshTable(int type);

private slots:
    void on_tableViewClick(QModelIndex nIndex);
    void on_tableViewDbClick(QModelIndex nIndex);
    void on_tableViewSort(int nColumn);
    void on_tableViewSelectAllCheckBoxClick(Qt::CheckState state);
    void on_pushButton_exit_clicked();

    void on_pb_PressureRegulation_clicked();

    void on_pb_Music_clicked();

    void on_pb_Train_clicked();

    void on_pb_SoulHealth_clicked();

    void on_pb_pr_hjjl_clicked();

    void on_pb_pr_yyly_clicked();

    void on_pb_pr_plhf_clicked();

    void on_pb_pr_nbsy_clicked();

    void on_pb_pr_xlsh_clicked();

    void on_pb_pr_zzdx_clicked();

    void on_pb_pr_sepp_clicked();

    void on_pb_pr_stly_clicked();

    void on_pb_pr_sxfs_clicked();

    void on_pb_pr_mxfs_clicked();

    void on_pb_pr_sdty_clicked();

    void on_pb_pr_jjrs_clicked();

    void on_pb_wuxingMusic_clicked();

    void on_pb_sqxsMusic_clicked();

    void on_pb_zfjsMusic_clicked();

    void on_pb_brainwaveMusic_clicked();

    void on_pb_enter_clicked();

    void getUserTableInfo(QHashUserTable m_hashUser);

    void getUserTableInfoABCD(QHashUserTable m_hashUser_A,QHashUserTable m_hashUser_B,QHashUserTable m_hashUser_C,QHashUserTable m_hashUser_D);

    void on_pb_hnxq_clicked();

    void on_pb_smxf_clicked();

    void on_pb_qljs_clicked();

    void on_pb_qlds_clicked();

    void on_pb_pts_clicked();

    void on_pb_lhsk_clicked();

    void on_pb_fhjc_clicked();

    void on_pb_ffmg_clicked();

    void on_pb_cnhk_clicked();

    void on_pb_msq_clicked();

    void on_pb_hjsy_clicked();

    void on_pb_dzsz_clicked();

    void on_pb_hjfs_clicked();

    void on_pb_fyfx_clicked();


    void on_pb_xkbh_clicked();

    void on_pb_lsjy_clicked();


private:
    Ui::ItemSelectPage *ui;
    QStandardItemModel *m_pTableModel;
    TableViewHeader *m_pTableHeader;
    QList<QString>MusicName1,MusicName2,MusicName3,MusicName4;
    QList<QString>MusicTime1,MusicTime2,MusicTime3,MusicTime4;
    QList<QString>MusicSinger1,MusicSinger2,MusicSinger3,MusicSinger4;
    QList<QString>MusicBelong1,MusicBelong2,MusicBelong3,MusicBelong4;
    QHashUserTable m_userTableHash;
    QHashUserTable m_userTableHash_A;
    QHashUserTable m_userTableHash_B;
    QHashUserTable m_userTableHash_C;
    QHashUserTable m_userTableHash_D;

    int MusicType;
    int Fcode,icode;
    QString Type,Scene;//场景
    int GroupOrBattle;

private:signals:
    void command_toClient(int type,QJsonObject json);
    void SendUserTableInfo(QHashUserTable m_userTableHash,QString TaskID,QString Type,QString scene,int Time);
    void SendUserTableInfoABCD(QHashUserTable m_userTableHash_A,QHashUserTable m_userTableHash_B,QHashUserTable m_userTableHash_C,QHashUserTable m_userTableHash_D,QString TaskID,QString Type,QString scene,int Time);
};

#endif // ITEMSELECTPAGE_H
